﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _18_继承
{
    class Program
    {
        static void Main(string[] args)
        {
        }
    }

    public class Person
    {
        private int _age;
        public int Age
        {
            get
            {
                return _age;
            }

            set
            {
                _age = value;
            }
        }

        private string _name;
        public string Name
        {
            get
            {
                return _name;
            }

            set
            {
                _name = value;
            }
        }

       public Person(string name, int age)
        {
            this._age = age;
            this._name = name;
        }
       //public Person() { }
    }

    class Student : Person
    {
        private int _id;
        private int score;

        public int Score
        {
            get
            {
                return score;
            }

            set
            {
                score = value;
            }
        }

        public int Id
        {
            get
            {
                return _id;
            }

            set
            {
                _id = value;
            }
        }

        Student(int age, string name, int id, int score): base(name,age)
        {

        }
    }


}
